/**
 * Created by Dalyn on 2017/3/14.
 */
import Relay from "react-relay";

export default class GetEnBalanceListMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { getEnBalanceList }`;
    }

    getVariables() {
        return {
            argsInput: {
                pageNum: this.props.pageNum,
                pageSize: this.props.pageSize,
                partyBEnName: this.props.partyBEnName,
                status: this.props.status,
                orderId: this.props.orderId,
                // partyBEnid:this.props.partyBEnid,
                // partyBEnName:this.props.partyBEnName,
                // status:this.props.status,
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on getEnBalanceListPayload {
            data {  
                errorCode
                value
                totalResult
                id
                enterpriseBalanceList{
                            orderId
                            partyAEnid
                            partyAEnName
                            partyBEnid
                            partyBEnName
                            loanMoney
                            loanInterest
                            remainAmount
                            status
                            applyTime
                            balanceTime
                            tranNo
                            product
                            productNum
                            invoiceImg
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on getEnBalanceListPayload {
                    data {
                        errorCode
                        value
                        totalResult
                        id
                        enterpriseBalanceList{
                            orderId
                            partyAEnid
                            partyAEnName
                            partyBEnid
                            partyBEnName
                            loanMoney
                            loanInterest
                            remainAmount
                            status
                            applyTime
                            balanceTime
                            tranNo
                            product
                            productNum
                            invoiceImg
                        }
                       
                    }
                }
            `]
        }];
    }

}